<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        /* 相对定位 */
        .box0{
            width: 200px;
            height: 200px;
            background-color: red;
            position: relative;
            left: 200px;
            top: 200px;
        }

       
        /* 绝对定位：脱离文档流，可能会覆盖其他元素 */
        .box1{
            width: 200px;
            height: 200px;
            background-color: blue;
            position: absolute;
            left: 100px;
            top: 200px;
        }

        .box2{
            width: 200px;
            height: 200px;
            background-color: purple;
            position: absolute;
            left: 50px;
            top: 100px;
        }  

        /* 固定定位：相对于浏览器窗口，不会随滚动条移动 */
          .box3{
            width: 100px;
            height: 100px;
            background-color: yellow;
            position: fixed;
            right: 50px;
            bottom: 50px;
        }

    </style>
</head>
<body>

    <div class="box0"></div>
    <div class="box1">1</div>
    <div class="box2">2</div>
    <div class="box3">3</div>

    
</body>
</html>